/** ****************************************************************************
 * CopyRight (C) 2012 Sharadendu Sinha.
 * Licensing : FreeBSD 
 *
 * @(#) $Id$
 */
package com.sps.signalling;

/**
 * This class represents a Signal. It implements the {@link Invokable} interface
 * 
 * @version 1.1
 * @author sharadendu
 */
public class Signal
	extends AbstractInvokable
{
	/**
	 * Only constructor for a {@link Signal}
	 * 
	 * @param name name of the {@link Signal}
	 * @param invokableProvider This is the {@link SignalEmmiter} for this
	 *            signal
	 */
	public Signal(String name, InvokableProvider invokableProvider)
	{
		super(name, invokableProvider);
	}

	/**
	 * @see com.sps.signalling.Invokable#getType()
	 */
	@Override
	public Type getType()
	{
		return Type.SIGNAL;
	}

	/**
	 * @see com.sps.signalling.Invokable#invoke(com.sps.signalling.InvokableConnection.Type,
	 *      java.lang.Object[])
	 */
	@Override
	public void invoke(InvokableConnection.Type invocationType,
		Object... paramObjects)
	{
		((SignalEmmiter)getProvider()).emit(this, paramObjects);
	}
}
